import request from '@/utils/request'

const api_name = '/admin/product/productSpec'

export const FindProductSpecPageList = (page,limit) => {
    return request({
        url: `${api_name}/${page}/${limit}`,
        method: 'get'
    })
}

export const SaveProductSpec = (data) => {
    return request({
        url: `${api_name}/save`,
        method: 'post',
        data
    })
}

export const UpdateProductSpecById = (data)=> {
    return request({
        url: `${api_name}/updateById`,
        method: 'put',
        data
    })
}

// 根据id删除数据
export const DeleteProductSpecById = id => {
    return request({
      url: `${api_name}/deleteById/${id}`,
      method: 'delete',
    })
}

export const FindAllProductSpec = () => {
    return request({
        url: `${api_name}/findAll`,
        method: 'get'
    })
}
